The candidate managed to squeak in with just enough votes to win.
Кандидат сумел пройти с минимальным запасом голосов, чтобы победить.
Definitions
To allow someone to participate in an event, activity, or opportunity at the last minute or just before a deadline, often by making a special exception or effort.